﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Algobox.Objects.Finance;
using Algobox.Objects.Finance.Assets.Stock;
using Algobox.Objects.Finance.Prices;

namespace Algobox.Feeds.Finance.MarketData
{
    public interface IMarketFeedAdaptor
    {
        string FeedName { get; }
        bool IsStarted { get; }

        event Action<IStock, long> OnSubscriptionAdded;
        event Action<IStock, long> OnSubscriptionRemoved;
        event Action OnMarketFeedShutdown;

        bool Start();
        void Stop();

        void SubscribeBid(IStock stock, IMarketUpdateBid callback);
        void SubscribeAsk(IStock stock, IMarketUpdateAsk callback);
        void SubscribeLast(IStock stock, IMarketUpdateLast callback);
        void SubscribePhase(IStock stock, IMarketUpdatePhase callback);
        void SubscribeOpen(IStock stock, IMarketUpdateOpen callback);

        void UnsubscribeBid(IStock stock, IMarketUpdateBid callback);
        void UnsubscribeAsk(IStock stock, IMarketUpdateAsk callback);
        void UnsubscribeLast(IStock stock, IMarketUpdateLast callback);
        void UnsubscribePhase(IStock stock, IMarketUpdatePhase callback);
        void UnsubscribeOpen(IStock stock, IMarketUpdateOpen callback);

        
    }
}
